package com.cmc.cloud.cmclink.doc.api.document;

import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifest.ManifestEdiQueryReqVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifest.ManifestEdiReqVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifest.ManifestInfoEdiRespVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifest.ManifestRespVO;
import com.cmc.cloud.cmclink.doc.constant.DocApiConstants;
import com.cmes.framework.common.pojo.CommonResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/**
 * HsCode RPC 接口查询
 *
 * @author 陈正
 */
@FeignClient(name = DocApiConstants.NAME)
@Tag(name = "RPC - 服务 舱单 EDI")
public interface ManifestEdiApi {

    String PREFIX = DocApiConstants.PREFIX + "/manifestEdi";

    /**
     * EDI创建更新删除舱单
     *
     * @param ediInfo
     * @return
     */
    @Operation(summary = "创建更新删除舱单")
    @PostMapping(PREFIX + "/manifestSync")
    CommonResult<String> manifestSync(@Valid @RequestBody ManifestEdiReqVO ediInfo);

    /**
     * EDI查询
     *
     * @param ediInfo
     * @return
     */
    @Operation(summary = "EDI查询")
    @PostMapping(PREFIX + "/manifestQuery")
    CommonResult<List<ManifestRespVO>> manifestQuery(@RequestBody ManifestEdiQueryReqVO ediInfo);


    /**
     * EDI查询详细
     *
     * @param ediInfo
     * @return
     */
    @Operation(summary = "EDI查询详细")
    @PostMapping(PREFIX + "/manifestDetailQuery")
    CommonResult<List<ManifestInfoEdiRespVO>> manifestDetailQuery(@RequestBody ManifestEdiQueryReqVO ediInfo);
}
